﻿#ifndef SNAKE_GAME_H_
#define SNAKE_GAME_H_
//------------------------------------------------------------------------
//
//  [11/18/2012 KimSiHoon]
//
//  Name:   Snake_Game.h
//
//  Desc:   허브클래스, 이곳에 게임로직이 들어간다. 
//
//  Author: 김시훈 (bongnam_go@naver.com) 
//
//  [11/22/2012 KimSiHoon]
//	LoadGame 삭제, GameClear / NextStage -> IsGameOver로 통합
//  
//------------------------------------------------------------------------

#include <iostream>
#include <time.h>
#include "Map.h"
#include "Define.h"
#include "MapManager.h"
#include "Snake.h"

using namespace std;

class Snake_Game
{

public:

	Snake_Game();
	~Snake_Game();
	void Run();

private:

	typedef enum { STAGE_ONE, STAGE_TWO, STAGE_THREE, STAGE_FOUR, STAGE_MAX } STAGE;

	const int kMaxItemPosWidth;
	const int kMaxItemPosHeigh;
	unsigned int current_stage_;

	int speed_;
	int goal_item_num_;
	int life_;

	Snake *snake_;

private:

	void SelectStage();
	bool InitGame();
	void Input();
	void Update();
	void Render();
	void DrawUI();
	bool IsGameOver();

};

#endif

